package zouran.service;

import org.springframework.transaction.annotation.Transactional;
import zouran.entity.EarthquakeInfo;
import zouran.entity.SelectCondition;

import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Author：zouran
 * Date：2023/3/31  20:55
 * Description:
 */
@Transactional
public interface EarthquakeInfoService {
    EarthquakeInfo getEarthquakeInfoById(long id);

    List<EarthquakeInfo> getAllEarthquakeInfo(Map<String, Object> parameter);

    List<EarthquakeInfo> getEarthquakeInfoByPosition(Double lon, Double lat);

    List<HashMap<String, Object>> getAllEarthquakeInfoPosition(Map<String, Object> parameter);

    List<EarthquakeInfo> getSeismicZonesEarthquakeInfo(Double east, Double south, Double west, Double north);

    List<HashMap<String, Object>> getSeismicZonesEarthquakeInfoPosition(Double east, Double south, Double west, Double north);

    List<EarthquakeInfo> getHistoryEarthquakeInfoList(String name);

    Map<String, Object> getEarthquakeInfoByCondition(SelectCondition selectCondition);

    List<HashMap<String, Object>> getEarthquakePositionInfoByCondition(SelectCondition selectCondition);

    boolean judgeEarthquakeInfoExist(String name, LocalDateTime time);

    boolean judgeEarthquakeInfoExistById(long id);

    int insertEarthquakeInfo(EarthquakeInfo earthquakeInfo);

    HashMap<String, Object> getEarthquakeIdRange();

    List<Double> getEarthquakeInfoByyear(Integer year);
}
